<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="public::head('项目管理')">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="UTF-8"></meta>

</head>
<body style="padding-top:50px;">
<input type="hidden" th:value="${session.Id}" id="id"/>
<input type="hidden" th:value="${session.Type}" id="Type"/>

<div th:replace="public/top_vote::top"></div>

<div id="Xiangmulist">

    <div class="primary-title">
    </div>

    <div class="primary-content">

        <div class="table-responsive" style="overflow:inherit;margin-top:40px;">

            <table class="table table-hover table-striped">
                <thead>
                <th style="text-align:center;vertical-align:middle;width: 50%">项目名称</th>
              <!--  <th style="text-align:center;vertical-align:middle;width: 20%">当前轮次</th>-->
                <th style="text-align:center;vertical-align:middle;width: 20%">状态</th>
                <th style="text-align:center;vertical-align:middle;"></th>
                </thead>

                <tbody>
                    <tr v-for="(xiangmu,index) in xiangmulist" v-if="show">
                        <td style="text-align:center;vertical-align:middle;" v-text="xiangmu.xiangmuname"></td>
                       <!-- <td style="text-align:center;vertical-align:middle;" v-text="xiangmu.lunci"></td>-->
                        <td style="text-align:center;vertical-align:middle;color: green" v-if="xiangmu.isactived==1" v-text="">启动</td>
                        <td style="text-align:center;vertical-align:middle;color: red" v-if="!xiangmu.isactived==1" v-text="">
                            停止
                        </td>
                        <td style="text-align:center;vertical-align:middle;" v-text="">
                            <button v-if="xiangmu.isactived==1" style="width: 100px;" v-on:click="toVote(xiangmu.xiangmuid,xiangmu.xiangmuleixing,xiangmu.lunci)" class="btn btn-info">进入</button>
                            <button v-if="!xiangmu.isactived==1" style="width: 100px;" disabled v-on:click="toVote(xiangmu.xiangmuid,xiangmu.xiangmuleixing,xiangmu.lunci)" class="btn btn-info">进入</button>
                        </td>
                    </tr>
                </tbody>

            </table>
            <div v-if="!show" style="text-align:center;width:100%;">查无数据</div>

        </div>

    </div>

</div>
</body>

<script th:src="@{/js/vote/list_xiangmu_vote.js}"></script>

<script type="text/javascript">
    var ID = $("#id").val();
    $(function() {
        if(ID==""){
            alert("请先登录！");
            location.href='../main/login';
        }
    });
</script>
</html>